# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
# Contributor: K. Piche <kpiche@rogers.com>

pkgname=perl-file-basedir
pkgver=0.09
pkgrel=1
pkgdesc='Use the Freedesktop.org base directory specification'
arch=('any')
license=('GPL' 'PerlArtistic')
url="https://search.cpan.org/dist/File-BaseDir/"
depends=('perl-ipc-system-simple')
makedepends=('perl-module-build>0.4205')
checkdepends=('perl-test-pod' 'perl-test-pod-coverage' 'perl-file-which' 'xdg-user-dirs')
options=('!emptydirs')
source=("https://search.cpan.org/CPAN/authors/id/P/PL/PLICEASE/File-BaseDir-$pkgver.tar.gz")
sha512sums=('07b07f43bce392beda6ac10729925c3b6ad850f0af5485c3f540b72353a1e877e7e9b76580057197cf68864086f1a3d1f9459cfcf142f16772f48125426d72db')

build() {
  cd File-BaseDir-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  mkdir .config
  cd File-BaseDir-$pkgver
  HOME="$srcdir" make test
}

package() {
  cd File-BaseDir-$pkgver
  make install DESTDIR="$pkgdir"
}
